package com.mycloud.web.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.stereotype.Controller;

import javax.servlet.http.HttpServletRequest;

/**
 * User: hossein bahramian
 * Date: Nov 22, 2011
 * Time: 9:33:25 PM
 */
@Controller
public class EchoController {

    @RequestMapping("/showEchoPage.cloud")
    public String showEchoPage(){
        return "echoPage";
    }

    @RequestMapping("/echoMe.cloud")
    public String echoMe(HttpServletRequest request, @RequestParam String message){
        request.setAttribute("echoString", "You said: " + message + ":)");
        return "echoResultPage";
    }
}
